package mysql

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ TbHistoryOrderModel = (*customTbHistoryOrderModel)(nil)

type (
	// TbHistoryOrderModel is an interface to be customized, add more methods here,
	// and implement the added methods in customTbHistoryOrderModel.
	TbHistoryOrderModel interface {
		tbHistoryOrderModel
		withSession(session sqlx.Session) TbHistoryOrderModel
	}

	customTbHistoryOrderModel struct {
		*defaultTbHistoryOrderModel
	}
)

// NewTbHistoryOrderModel returns a model for the database table.
func NewTbHistoryOrderModel(conn sqlx.SqlConn) TbHistoryOrderModel {
	return &customTbHistoryOrderModel{
		defaultTbHistoryOrderModel: newTbHistoryOrderModel(conn),
	}
}

func (m *customTbHistoryOrderModel) withSession(session sqlx.Session) TbHistoryOrderModel {
	return NewTbHistoryOrderModel(sqlx.NewSqlConnFromSession(session))
}
